﻿using Microsoft.Extensions.DependencyInjection;

namespace ExampleService.APIContract
{
    public static class HttpApiExtensions
    {
        public static void AddHttpApi(this IServiceCollection services, Type httpApiType, string host)
        {
            services.AddHttpApi(httpApiType, options =>
            {
                options.HttpHost = new Uri(host);
                options.GlobalFilters.Add(new AuthTokenFilter());
            });

        }
    }
}
